<%@page import="com.sasis.util.FlowStates"%>
<%@page import="com.cvicse.workflow.api.WfWorkItem"%>
<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>worklist</title>
<link rel="stylesheet" type="text/css" media="all" href="/sasis/styles/css.css" />
</head>
<body>
<form name="f1" method="post">
<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td align="left" valign="top" colspan1=18><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="31" class="titlebgcolor"><table width="189" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="11">&nbsp;</td>
            <td width="26"><img src="images/passenger.gif" width="21" height="22" /></td>
            <c:if test="${2==param.type}">
            <td width="152">已办任务</td>
            </c:if>
			<c:if test="${3==param.type}">
           <td width="152">已结束流程</td>
            </c:if>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="30" align="right" background="images/list_title_bg.jpg">
            <sasis:page items="${workitemList}"/>
            </td>
            <td width="6" align="right" valign="top"><img src="images/list_title_right.jpg" width="6" height="30" /></td>
          </tr>
        </table></td>
      </tr>  
  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
          <td width1="100%" align="left" valign="top" class="list_area_bg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="1%" align="left" valign="top">&nbsp;</td>
            <td width="99%" align="left" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" class="list_bordercolor">
                <tr>
            <td class="list_font_title">工作项标志号</td>
			<td class="list_font_title">名称</td>
			<td class="list_font_title">参与人</td>
			<%--td class="list_font_title">优先级</td--%>
			<td class="list_font_title">状态</td>
			<td class="list_font_title">所属活动</td>
			<td class="list_font_title">所属流程</td>
			<td class="list_font_title">工作项创建时间</td>
			<td class="list_font_title">工作项接收时间</td>
		</tr>
		
		<c:forEach var="workitem" items="${workitemList}">
		<tr>
			
			<td class="list_font_area"><c:out value="${workitem.id}"/></td>

			<td class="list_font_area"><c:out value="${workitem.name}"/></td>

			<td class="list_font_area">&nbsp;&nbsp; <c:out value="${workitem.participant}"/></td>
			<%--td class="list_font_area">&nbsp;&nbsp;<c:out value="${workitem.priority}"/></td--%>
			<td class="list_font_area">&nbsp;&nbsp;
			<c:set var="state" value="${workitem}"/>
			<%
			out.println(FlowStates.getStateZH(((WfWorkItem)pageContext.getAttribute("state")).getState()));
			%>
			</td>
			<td class="list_font_area">&nbsp;&nbsp;<c:out value="${workitem.activityInstanceId}"/></td>
			<td class="list_font_area">&nbsp;
			<c:if test="${2==param.type}">
				<a href='./ProcessPicture?procInstId=<c:out value="${workitem.processInstanceId}"/>'><c:out value="${workitem.processInstanceId}"/></a>
			</c:if>
			<c:if test="${3==param.type}">	
				<a href='./ProcessPicture?procInstId=<c:out value="${workitem.processInstanceId}"/>&isProcessClosed=true'><c:out value="${workitem.processInstanceId}"/></a>
			</c:if>				
			</td>
		
			<td class="list_font_area"><c:out value="${workitem.createTime}"/></td>

		
			<td class="list_font_area"><c:out value="${workitem.receiveTime}"/></td>

		</tr>
		</c:forEach>
		
                </table></td>
                
              </tr>
			
            </table></td>
            <td width="8" align="left" valign="top" background="images/list_area_right.jpg">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="4" align="left" valign="top"><img src="images/list_bottom_left.jpg" width="4" height="8" /></td>
            <td align="left" valign="top"><img src="images/list_bottom_middle.jpg" width="100%" height="8" /></td>
            <td width="6" align="right" valign="top"><img src="images/list_bottom_right.jpg" width="6" height="8" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>